{{ define "main" }}
  <div>{{ .Content }}</div>
    {{ if .Sections }}
      {{ range .Sections.ByWeight }}
      <div class="doc-section">
      <h4 class="doc-section-header"><a href="{{ .Permalink | relURL }}">{{ .Title }}</a></h4>
      <div class="doc-section-content">
        {{ .Content }}
          <ul>  
              {{ range .CurrentSection.Pages.ByWeight }}
              <li><a href="{{ .Permalink | relURL }}" title="{{ .Title }}">{{ .Title }}</a><br/></li>
              {{ end }}
          </ul>
      </div>
      </div>
      {{ end }}
    {{else}}
      <ul>  
          {{ range .CurrentSection.Pages.ByWeight }}
          <li><a href="{{ .Permalink | relURL }}" title="{{ .Title }}">{{ .Title }}</a><br>{{ .Summary }}<br></li>
          {{ end }}
      </ul>
    {{end}}
{{ end }}
